package com.example.cloudsentinel.service;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.example.cloudsentinel.common.CommonException;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @SentinelResource(value = "getUser",
            fallback = "fallback", fallbackClass = CommonException.class,
            blockHandler = "handleException", blockHandlerClass = CommonException.class
    )
    public String getUser() {
        return "获取到用户信息";
    }
}
